package design.pattern.观察者模式;

import javax.security.auth.Subject;

/**
 * 具体观察者
 */
public class ConcreateObeserver<T> extends Obeserver<T>{

    private String name;

    private Subject subject;

    ConcreateObeserver(String name){
        this.name = name;
    }

    private T subjectStatus;

    @Override
    public void update(T newStatus) {
        this.subjectStatus = newStatus;
        System.out.println("观察者：" + name + "的状态是" + newStatus);
    }
}
